Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
Cannot read properties of undefined (reading 'create')

I decided to create a game called Slinky Untangle. I chose to use Matter.JS, Executing the code, I get this

TypeError: Cannot read properties of undefined (reading 'create') at /script.js:12:21

Here is my code.

let Engine
x=document.createElement("script");x.src="https://github.com/liabru/matter-js/raw/master/build/matter.js"; document.head.appendChild(x);
var slinky = slinky || {};

slinky.wiggle = function() {
 Engine = slinky.Engine;
 Render = slinky.Render;
 Body = slinky.Body;
 MouseConstraint =
  slinky.MouseConstraint
};
var engine = Engine.create(),
 world = engine.world;
var render = Render.create({
  element: document.body,
  engine: engine,
  options: {
    width: 800,
    height: 600,
    wireframes: false
  }
});

I am quite new to JavaScript although I known it a lot.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda