diff --git a/.eslintrc.js b/.eslintrc.js index 1b6e655..10c592a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -35,7 +35,7 @@ module.exports = { 'callback-return': 'error', 'camelcase': 'error', 'capitalized-comments': 'off', - 'class-methods-use-this': 'error', + 'class-methods-use-this': 'off', 'comma-dangle': 'error', 'comma-spacing': [ 'error', diff --git a/LICENSE b/LICENSE index 2d2b0e4..30e0275 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2011-2016 Bartek Szopka +Copyright (c) 2011-2016 Bartek Szopka, 2016-2024 Henrik Ingo, 2024 Janis Hutz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/impress.js b/src/impress.js index 3366c80..fd72d1a 100644 --- a/src/impress.js +++ b/src/impress.js @@ -6,7 +6,7 @@ * in modern browsers and inspired by the idea behind prezi.com. * * - * Copyright 2011-2012 Bartek Szopka (@bartaz), 2016-2023 Henrik Ingo (@henrikingo), 2024 Janis Hutz + * Copyright 2011-2012 Bartek Szopka (@bartaz), 2016-2024 Henrik Ingo (@henrikingo), 2024 Janis Hutz * and 70+ other contributors * * Released under the MIT License. @@ -21,10 +21,50 @@ // Welcome to the impress.js source code // You are one of those who would like to know how impress.js works? // Let us show you! +// NOTE that compared to previous versions of impress, this code is documented in a more technical fashion. -function () { - "use strict"; +// Important note on the file structure of impress.js, as it has changed with V3 +// This file contains all the interface definitions and uses various components from the ./lib directory, +// as well as loading impress plugins from the ./plugins directory. A fully built impress.js version +// has all of these files combined into a single file, as to enable a simple include. + +window.impress = () => { + 'use strict'; + + // this function is used to initialize impress. It calls various private functions that initialize + // various components var init = () => { - console.log( 'impress-init' ); + console.log( 'init' ); }; -}; + + // This function can be used to add new elements to the impress 3D-API + + /** + * Use this function to create a new element on the virtual canvas of impress.js + * It is used for example by the "presentation" plugin, which parses the presentation + * and initializes impress itself. You can also use this function to edit a previously + * generated element. This allows for example the Overview plugin to work as it does. + * + * Returns true if successful at positioning this element, false, if failed + * @param {string} DOMElementID + * @param {object} coordinates + * @param {object} rotation + * @return {boolean} + */ + var addElement = ( DOMElementID, coordinates, rotation ) => { + console.log( 'element added' ); + return true; + }; + + /** + * Description + * @param {any} DOMElementID + * @return {any} + */ + var removeElement = ( DOMElementID ) => { + }; + + return { + init + }; +}; \ No newline at end of file diff --git a/src/index.html b/src/index.html index ad76192..8e03fd4 100644 --- a/src/index.html +++ b/src/index.html @@ -13,19 +13,15 @@