@playcanvas/react
Version:
A React renderer for PlayCanvas – build interactive 3D applications using React's declarative paradigm.
47 lines • 1.23 kB
JavaScript
import React from 'react';
/** For full coverage, define similarly for each PlayCanvas component:
* - Animation
* - AudioListener
* - Button
* - Collision
* - Element
* - LayoutChild
* - LayoutGroup
* - Model
* - ParticleSystem
* - RigidBody
* - Screen
* - Script
* - ScrollView
* - Sound
* - SoundSlot
* - Zone
* ... or at least the ones you need
*/
/****************************************************************
* React Elements
* We use TS generics so each component gets typed props
****************************************************************/
export const Entity = (props) => {
return React.createElement('entity', props);
};
export const Model = (props) => {
return React.createElement('model', props);
};
export const Camera = (props) => {
return React.createElement('camera', props);
};
export const Light = (props) => {
return React.createElement('light', props);
};
export const RigidBody = (props) => {
return React.createElement('rigidbody', props);
};
/** You'd continue with all other possible components:
* - <Collision />
* - <Element />
* - <Animation />
* - <ParticleSystem />
* ... etc
*/
//# sourceMappingURL=components.js.map