A starter template for creating playable ads using Three.js with TypeScript support. This template combines:
- Three.js - 3D graphics library for creating immersive WebGL experiences
- @smoud/playable-sdk - SDK for creating playable ads with standardized events and methods
- @smoud/playable-scripts - Build and development tools optimized for playable ads
Try out this template:
- Three.js integration for high-performance 3D graphics
- TypeScript support for better development experience
- Hot module replacement during development
- Game structure with Three.js and SDK integration
- Event handling (resize, pause, resume, volume, etc.)
- Installation button implementation
- Interaction tracking
- Responsive 3D scene scaling
- GLTF model loading and animation
- Proper lighting setup
- Smooth animation loop management
- Clone this repository
- Install dependencies:
npm install
- Start development server:
npm run dev
- Build for production:
npm run build
src/index.ts
- Main entry point with SDK, Three.js and Game initializationsrc/Game.ts
- Game logic and Three.js scene setupsrc/index.css
- Styles for your playablesrc/index.html
- HTML templateassets/
- Directory for your game assets (3D models, textures, etc.)
Check out other available templates for different frameworks and use cases:
- playable-template-base - Template base version
- playable-template-base-js - Template base version (JavaScript)
- playable-template-pixi - Template with PixiJS
- playable-template-phaser - Template with Phaser