Anyone minified enable3d to use for playable ads?

Hi!

Vanilla enable3d depends on phaser NPM module while for playables it is assumed compact single-file implementation of phaser will be used. Does anyone resolved this issue? Are there any playables examples using enable3d? I did not managed to find any yet. Thx!

I hope this is what you want. I recommend watching the video.

// import the UMD bundle enable3d.framework.min.js
// or from npm enable3d import { Project, Scene3D, PhysicsLoader } from ‘enable3d’

import { Scene3D, PhysicsLoader } from ‘enable3d’
class MainScene extends Scene3D { … }

// Assuming the UMD bundle exposes enable3d globally
class MainScene extends window.enable3d.Scene3D {
constructor() {
super(‘MainScene’);
// You may need to manually run the physics loader if the global
// initialization doesn’t do it automatically.
// window.enable3d.PhysicsLoader.enable(this);
}
// … your game code
}

Phaser is actually only listed as a dependency in @enable3d/phaser-extension. Enable3d itself does not require Phaser to run. For creating playable ads, I imagine you could use Enable3d (standalone) and its built-in 2D elements.

​While I’m not entirely sure of the specific requirements for playable ads, I suspect you could simply use esbuild to bundle everything into a single, lightweight package.