Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to pcx namespace #6304

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/extras/gizmo/gizmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.on('pointer:down', (x, y, meshInstance) => {
* console.log(`Pointer was down on ${meshInstance.node.name} at ${x}, ${y}`);
* });
Expand All @@ -61,7 +61,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.on('pointer:move', (x, y, meshInstance) => {
* console.log(`Pointer was moving on ${meshInstance.node.name} at ${x}, ${y}`);
* });
Expand All @@ -73,7 +73,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.on('pointer:up', (x, y, meshInstance) => {
* console.log(`Pointer was up on ${meshInstance.node.name} at ${x}, ${y}`);
* })
Expand All @@ -85,7 +85,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.on('position:update', (position) => {
* console.log(`The gizmo's position was updated to ${position}`);
* })
Expand All @@ -97,7 +97,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.on('rotation:update', (rotation) => {
* console.log(`The gizmo's rotation was updated to ${rotation}`);
* });
Expand All @@ -109,7 +109,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.on('scale:update', (scale) => {
* console.log(`The gizmo's scale was updated to ${scale}`);
* });
Expand All @@ -121,7 +121,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.on('nodes:attach', () => {
* console.log('Graph nodes attached');
* });
Expand All @@ -133,7 +133,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.on('nodes:detach', () => {
* console.log('Graph nodes detached');
* });
Expand All @@ -145,7 +145,7 @@ class Gizmo extends EventHandler {
*
* @event
* @example
* const gizmo = new pcx.TransformGizmo(app, camera, layer);
* const gizmo = new pc.TransformGizmo(app, camera, layer);
* gizmo.on('render:update', () => {
* console.log('Gizmo render has been updated');
* });
Expand Down Expand Up @@ -244,7 +244,7 @@ class Gizmo extends EventHandler {
* @param {import('../../framework/components/camera/component.js').CameraComponent} camera - The camera component.
* @param {import('../../scene/layer.js').Layer} layer - The render layer.
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
*/
constructor(app, camera, layer) {
super();
Expand Down Expand Up @@ -426,7 +426,7 @@ class Gizmo extends EventHandler {
*
* @param {import('../../scene/graph-node.js').GraphNode[]} [nodes] - The graph nodes. Defaults to [].
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.attach([boxA, boxB]);
*/
attach(nodes = []) {
Expand All @@ -449,7 +449,7 @@ class Gizmo extends EventHandler {
* Detaches all graph nodes from the gizmo.
*
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.attach([boxA, boxB]);
* gizmo.detach();
*/
Expand All @@ -467,7 +467,7 @@ class Gizmo extends EventHandler {
* all graph nodes.
*
* @example
* const gizmo = new pcx.Gizmo(app, camera, layer);
* const gizmo = new pc.Gizmo(app, camera, layer);
* gizmo.attach([boxA, boxB]);
* gizmo.destroy();
*/
Expand Down
2 changes: 1 addition & 1 deletion src/extras/gizmo/rotate-gizmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class RotateGizmo extends TransformGizmo {
* The camera component.
* @param {import('../../scene/layer.js').Layer} layer - The render layer.
* @example
* const gizmo = new pcx.RotateGizmo(app, camera, layer);
* const gizmo = new pc.RotateGizmo(app, camera, layer);
*/
constructor(app, camera, layer) {
super(app, camera, layer);
Expand Down
2 changes: 1 addition & 1 deletion src/extras/gizmo/scale-gizmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ScaleGizmo extends TransformGizmo {
* The camera component.
* @param {import('../../scene/layer.js').Layer} layer - The render layer.
* @example
* const gizmo = new pcx.ScaleGizmo(app, camera, layer);
* const gizmo = new pc.ScaleGizmo(app, camera, layer);
*/
constructor(app, camera, layer) {
super(app, camera, layer);
Expand Down
8 changes: 4 additions & 4 deletions src/extras/gizmo/transform-gizmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class TransformGizmo extends Gizmo {
*
* @event
* @example
* const gizmo = new pcx.TransformGizmo(app, camera, layer);
* const gizmo = new pc.TransformGizmo(app, camera, layer);
* gizmo.on('transform:start', () => {
* console.log('Transformation started');
* });
Expand All @@ -117,7 +117,7 @@ class TransformGizmo extends Gizmo {
*
* @event
* @example
* const gizmo = new pcx.TransformGizmo(app, camera, layer);
* const gizmo = new pc.TransformGizmo(app, camera, layer);
* gizmo.on('transform:move', (pointDelta, angleDelta) => {
* console.log('Transformation moved by ${pointDelta} (angle: ${angleDelta})');
* });
Expand All @@ -129,7 +129,7 @@ class TransformGizmo extends Gizmo {
*
* @event
* @example
* const gizmo = new pcx.TransformGizmo(app, camera, layer);
* const gizmo = new pc.TransformGizmo(app, camera, layer);
* gizmo.on('transform:end', () => {
* console.log('Transformation ended');
* });
Expand Down Expand Up @@ -308,7 +308,7 @@ class TransformGizmo extends Gizmo {
* The camera component.
* @param {import('../../scene/layer.js').Layer} layer - The render layer.
* @example
* const gizmo = new pcx.TransformGizmo(app, camera, layer);
* const gizmo = new pc.TransformGizmo(app, camera, layer);
*/
constructor(app, camera, layer) {
super(app, camera, layer);
Expand Down
2 changes: 1 addition & 1 deletion src/extras/gizmo/translate-gizmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class TranslateGizmo extends TransformGizmo {
* The camera component.
* @param {import('../../scene/layer.js').Layer} layer - The render layer.
* @example
* const gizmo = new pcx.TranslateGizmo(app, camera, layer);
* const gizmo = new pc.TranslateGizmo(app, camera, layer);
*/
constructor(app, camera, layer) {
super(app, camera, layer);
Expand Down
4 changes: 2 additions & 2 deletions src/extras/mini-stats/mini-stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MiniStats {
* for displaying a budget.
* @example
* // create a new MiniStats instance using default options
* const miniStats = new pcx.MiniStats(app);
* const miniStats = new pc.MiniStats(app);
*/
constructor(app, options) {
const device = app.graphicsDevice;
Expand Down Expand Up @@ -139,7 +139,7 @@ class MiniStats {
*
* @returns {object} The default options for MiniStats.
* @example
* const options = pcx.MiniStats.getDefaultOptions();
* const options = pc.MiniStats.getDefaultOptions();
*/
static getDefaultOptions() {
return {
Expand Down